package me.keiwu.user.util.enums;

import lombok.Getter;

/**
 * Created by kei on 30/01/2018.
 */
public enum ItemCategory {

    COMMON(0),
    MEDAL(1),

    ;


    @Getter
    private int category;


    ItemCategory(int category) {
        this.category = category;
    }


    public static ItemCategory parse(int category) {
        for (ItemCategory cate : ItemCategory.values()) {
            if (cate.getCategory() == category) {
                return cate;
            }
        }
        return null;
    }
}
